home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / clipper / ks94an.zip / XLOG.HDR < prev    next >
Text File  |  1994-04-25  |  2KB  |  63 lines

  1. /******************************************************************************
  2.                  The Klipper Library, for CA-Clipper 5.x
  3.         Copyright (c), 1994, Wallace Information Systems Engineering
  4.  
  5. FUNCTION:
  6.  
  7. _XLog( cWhat, cWhere ) --> nAppendStatus
  8.  
  9. PARAMETERS:
  10.  
  11. cWhat   : Text String to Log
  12. cWhere  : Log File Name (Default = EXEC_LOG.DAT
  13.  
  14. SHORT:
  15.  
  16. Log a line of text to a system log file.
  17.  
  18. DESCRIPTION:
  19.  
  20. _XLog() accepts a string and logs it to a database. If the specified
  21. database does not exist it is created with the following structure:
  22.  
  23. LOG_WHAT   Char  100
  24.  
  25. It has only one field as noted above.  Each line is date / time stamped as
  26. it comes in and the text is added to that.
  27.  
  28. The log file does not have to be limited to this structure. You may create
  29. the file before hand and, so long as it at least has a character field (of
  30. any length) named LOG_WHAT, this function will work fine.
  31.  
  32. NOTE:
  33.  
  34. This function may be called at ANY time, while ANY other files are open.  If
  35. any database files are open when the call is made, the EXEC_LOG.DAT file is
  36. opened in an UNUSED area, the transaction takes place, the file is closed and
  37. the area that was current before the call was made is restored to current
  38. status.
  39.  
  40. This function is extremely useful for recording program activity and for
  41. recording important events and who performed them (in a network environment).
  42.  
  43. RETURNS:  0 Error: Undefined Error
  44.          -1 Error: Area in Use
  45.           1 Error: File Use Error
  46.  
  47. NOTE: WORK AREA 70 IS RESERVED FOR THIS FUNCTION (for the time being.  I'm
  48. due to get around to this function soon, and will be bringing it out of the
  49. Summer '87 dark ages.)
  50.  
  51.  
  52. EXAMPLE:
  53.  
  54. Assume EXEC_LOG.DAT does not exist:
  55.  
  56. _XLog('User BETTYG Logged On')
  57.  
  58. Result: The EXEC_LOG.DAT file is created with the default structure
  59. (LOG_WHAT, C, 100), a record is appended and replaced with a date/time
  60. stamp, and the text "User BETTYG Logged On".
  61.  
  62. ******************************************************************************/
  63.